/*
 * CPanicServer.cpp
 *
 *  Created on: 2010-12-14
 *      Author: Xairy
 */

#include "CPanicServer.h"
#include "CPanicSession.h"
#include "Service.h"

CPanicServer::CPanicServer(CActive::TPriority aPriority)
    :CServer2(aPriority)
{
   
}

CPanicServer::~CPanicServer()
{
    
}

CPanicServer* CPanicServer::NewL(CActive::TPriority aPriority)
{
    CPanicServer* result = new(ELeave) CPanicServer(aPriority);
    result->ConstructL();
    return result;
}

void CPanicServer::ConstructL()
{
}

CSession2* CPanicServer::NewSessionL(const TVersion &aVersion,const RMessage2& aMessage)const
{
    TVersion v(KPanicServerMajorVersionNumber, KPanicServerMinorVersionNumber,
               KPanicServerBuildVersionNumber);
    if (!User::QueryVersionSupported(v,aVersion))
         User::Leave(KErrNotSupported);
    
    return CPanicSession::NewL(aMessage);
}
